package pwd.allen.one;

/**
 * @author lenovo
 * @create 2021-05-07 17:17
 **/
public class MyService {

    public int add(int a, int b) {
        System.out.println(String.format("a=%d, b=%d", a, b));
        return a + b;
    }

    public void print(String str) {
        System.out.println(privateMethod(str));
    }

    public static String toUpperCase(String str) {
        System.out.println("invoke static method");
        return str != null ? str.toUpperCase() : null;
    }

    private String privateMethod(String str) {
        return "private:" + str;
    }

    public final String finalMethod(String str) {
        return "final method:" + str;
    }
}
